import { storeBindingsBehavior} from "mobx-miniprogram-bindings";
import { store} from "../../store";

Component({
  behaviors: [storeBindingsBehavior],
  options: {
    addGlobalClass: true
  },
  properties: {},
  storeBindings: {
    store,
    fields: {
      lang: (store) => store.lang
    },
    actions: {
      updateLang: "updateLang"
    }
  },
  methods: {
    changeLang(e) {
      this.updateLang(e.currentTarget.dataset.lang)
    }
  }
})